package hn.cch.hadoop.wordcount;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.util.Tool;

public class YarnTool implements Tool {

    Configuration configuration = new Configuration();

    @Override
    public int run(String[] args) throws Exception {
        boolean result = WordCountMain.run(configuration, args);
        return result ? 0 : 1;
    }

    @Override
    public void setConf(Configuration configuration) {
        this.configuration = configuration;
    }

    @Override
    public Configuration getConf() {
        return configuration;
    }
}
